<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>充电特效2</title>
    <style>
        * {
            margin: 0;
            padding: 0;
        }

        body {
            background: #000;
        }

        .box {
            width: 800px;
            height: 500px;
            background: #000;
            margin: 50px auto;
            padding-top: 50px;
            position: relative;
        }

        .battery {
            width: 200px;
            height: 320px;
            border-radius: 15px 15px 5px 5px;
            margin: 0 auto;
            background: #fff;
            position: relative;
        }

        .battery::before {
            content: "";
            width: 50px;
            height: 20px;
            background: #fff;
            border-radius: 5px 5px 0 0;
            position: absolute;
            top: -20px;
            left: 50%;
            margin-left: -25px;
        }

        .battery::after {
            content: "";
            background: linear-gradient(to bottom, #7abcff 0%, #00BCD4 44%, #2196F3 100%);
            position: absolute;
            left: 0;
            right: 0;
            top: 0;
            bottom: 0;
            border-radius: 15px 15px 5px 5px;
            box-shadow: 0 14px 28px rgba(33, 150, 243, 0), 0 10px 10px rgba(9, 188, 215, 0.08);
            filter: hue-rotate(90deg);

            animation: charging 10s linear infinite;
            animation-fill-mode: forwards;
        }

        @keyframes charging {
            50% {
                box-shadow: 0 14px 29px rgba(0, 150, 136, 0.83) 0px 4px 10px rgba(9, 188, 215, 0.4);
            }

            95% {
                top: 0;
                filter: hue-rotate(0deg);
                box-shadow: 0 14px 28px rgba(4, 188, 213, 0.2) 0 10px 10px rgba(9, 188, 215, 0.08);
            }

            100% {
                top: 0;
                filter: hue-rotate(90deg);
                box-shadow: 0 14px 28px rgba(4, 188, 213, 0) 0 10px 10px rgba(9, 188, 215, 0.4);
            }
        }

        .cover {
            width: 100%;
            height: 100%;
            position: absolute;
            bottom: 0;
            left: 0;
            overflow: hidden;
            z-index: 1;
            border-radius: 15px 15px 5px 5px;
        }


        .cover::before {
            content: "";
            width: 400px;
            height: 400px;
            position: absolute;
            left: 50%;
            animation: coverBeforeRotate 10s linear infinite;
            border-radius: 40% 30%;
            background: rgba(255, 255, 255, 0.8);
        }


        .cover::after {
            content: "";
            width: 400px;
            height: 400px;
            position: absolute;
            left: 50%;
            animation: coverAfterRotate 10s linear infinite;
            border-radius: 40% 42%;
            background: rgba(255, 255, 255, 0.7);
        }

        @keyframes coverBeforeRotate {
            0% {
                transform: translate(-50%, 20%) rotate(0deg);
                bottom: 0;
            }

            100% {
                transform: translate(-50%, 1%) rotate(360deg);
                bottom: 100%;
            }
        }

        @keyframes coverAfterRotate {
            0% {
                transform: translate(-50%, 20%) rotate(30deg);
                bottom: 0;
            }

            100% {
                transform: translate(-50%, 1%) rotate(360deg);
                bottom: 100%;
            }
        }
    </style>
</head>

<body>
    <div class="box">
        <div class="battery">
            <div class="cover"></div>
        </div>
    </div>
</body>

</html>